/*
 * Copyright 2014 Graham Smith
 */
package uk.co.wobblycogs.vegas.riff;

import java.nio.ByteBuffer;
import java.util.List;

/**
 *
 * @author Graham Smith
 */
public interface RIFFObject {

	/**
	 * Sixteen bytes of type information
	 *
	 * @return
	 */
	byte[] getRawType();

	RIFFType getType();

	/**
	 * The chunk length
	 *
	 * @return
	 */
	int getLength();

	/**
	 * Sixteen bytes of signature information. Only provided by RIFF and LIST
	 * types. CHUNK types supply an empty array.
	 *
	 * @return
	 */
	byte[] getSignature();

	/**
	 * The whole chunk including the type, length and signature information
	 *
	 * @return
	 */
	byte[] getData();

	/**
	 * Gets the children of this object. Only provided by RIFF and LIST types.
	 * CHUNK types return an empty array.
	 *
	 * @return
	 */
	List<RIFFObject> getChildren();

	void load(ByteBuffer bb);
}
